Skip to content

Allow wp core download in a subdir of an existing website#3

Open
wvega wants to merge 1 commit intomasterfrom
wp-core-download-in-subdir
Open

Allow wp core download in a subdir of an existing website#3
wvega wants to merge 1 commit intomasterfrom
wp-core-download-in-subdir

Conversation

@wvega
Copy link
Contributor

@wvega wvega commented Oct 11, 2019

Without --path WP-CLI exits with an error indicating that "WordPress files seem to already be present here".

Without `--path` WP-CLI exits with an error indicating that "WordPress files seem to already be present here".
@wvega wvega requested a review from jorgeatorres October 11, 2019 19:04
@wvega wvega self-assigned this Oct 11, 2019
@jorgeatorres
Copy link
Contributor

jorgeatorres commented Oct 17, 2019

@wvega: But aren't we cd-ing into the destination folder before calling wp core download? Even with the —path argument, I believe WP-CLI will complain about WP being already installed.

Can you post some step by step instructions on how to reproduce the bug? I'm probably missing something 🙈.

@wvega
Copy link
Contributor Author

wvega commented Oct 18, 2019

I was missing a key part of the problem 🤦🏻‍♂️

The issue only occurs if you have wp-cli.yml in one of the parent directories of $DEST_DIR, pointing to an existing WordPress installation.

Try this:

mkdir -p /tmp/wpv && cd /tmp/wpv
echo "path: example-main" > wp-cli.yml
wpv -c -s example-main -d example-main
cd example-main
wpv -c -s example-subdir -d example-subdir

Clean up with:

cd
valet unlink example-main
valet unlink example-subdir
mysql -uroot -e "DROP DATABASE example_main; DROP DATABASE example_subdir;"
rm -rf /tmp/wpv

@wvega
Copy link
Contributor Author

wvega commented Oct 18, 2019

I guess the problem is different now. I will have to check what other effects could cause that wp-cli.yml file and find a proper way to prevent them.

@jorgeatorres jorgeatorres removed their request for review March 14, 2022 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants